From 6ab0439bdcee90221e611aaef57d350699078582 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 18 Jul 2019 09:22:02 +0100 Subject: [PATCH] Improve .pc file to avoid over-linking (and Lintian false-positives) --- debian/changelog | 2 ++ ...rty-libraries-from-Libs-to-Libs.priv.patch | 29 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 32 insertions(+) create mode 100644 debian/patches/gtk4.pc-Move-third-party-libraries-from-Libs-to-Libs.priv.patch diff --git a/debian/changelog b/debian/changelog index 0082e27930..2e37fef23e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -75,6 +75,8 @@ gtk+4.0 (3.96.0-1) UNRELEASED; urgency=medium * Add Build-Depends-Package to symbols file * d/p/testsuite-Remove-dangling-references-to-box-packing-tests.patch: Fix dangling references to removed box-packing tests + * d/p/gtk4.pc-Move-third-party-libraries-from-Libs-to-Libs.priv.patch: + Improve .pc file to avoid over-linking (and Lintian false-positives) [ Laurent Bigonville ] * Add Closes statement for #910640 diff --git a/debian/patches/gtk4.pc-Move-third-party-libraries-from-Libs-to-Libs.priv.patch b/debian/patches/gtk4.pc-Move-third-party-libraries-from-Libs-to-Libs.priv.patch new file mode 100644 index 0000000000..59405daec2 --- /dev/null +++ b/debian/patches/gtk4.pc-Move-third-party-libraries-from-Libs-to-Libs.priv.patch @@ -0,0 +1,29 @@ +From: Simon McVittie +Date: Thu, 18 Jul 2019 09:20:57 +0100 +Subject: gtk4.pc: Move third-party libraries from Libs to Libs.private + +This avoids "overlinking". These libraries are an implementation detail +of particular backends, so they only need to appear on library consumers' +linker command-lines if the dependency cannot be picked up from the +shared library automatically (when linking statically, or when building +on a deficient OS that doesn't support transitive dependencies between +shared libraries, in which case pkg-config should be built with +--enable-indirect-deps). + +Signed-off-by: Simon McVittie +--- + gtk4.pc.in | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/gtk4.pc.in b/gtk4.pc.in +index e721361..b6822bd 100644 +--- a/gtk4.pc.in ++++ b/gtk4.pc.in +@@ -12,5 +12,6 @@ Description: GTK Graphical UI Library + Version: @VERSION@ + Requires: @GDK_PACKAGES@ @GSK_PACKAGES@ @GTK_PACKAGES@ + Requires.private: @GDK_PRIVATE_PACKAGES@ @GSK_PRIVATE_PACKAGES@ @GTK_PRIVATE_PACKAGES@ +-Libs: -L${libdir} -lgtk-4 @GDK_EXTRA_LIBS@ @GSK_EXTRA_LIBS@ @GTK_EXTRA_LIBS@ ++Libs: -L${libdir} -lgtk-4 ++Libs.private: @GDK_EXTRA_LIBS@ @GSK_EXTRA_LIBS@ @GTK_EXTRA_LIBS@ + Cflags: -I${includedir}/gtk-@GTK_API_VERSION@ @GDK_EXTRA_CFLAGS@ @GSK_EXTRA_CFLAGS@ @GTK_EXTRA_CFLAGS@ diff --git a/debian/patches/series b/debian/patches/series index 809c9722c7..341083f594 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ testsuite-Remove-dangling-references-to-box-packing-tests.patch +gtk4.pc-Move-third-party-libraries-from-Libs-to-Libs.priv.patch -- 2.30.2